package test.edu;

import com.edu.ActionContext;
import interceptor.Interceptor;
import interceptor.InterceptorChain;
import view.ContentViewResult;

import java.io.IOException;

public class FHandler implements Interceptor {

    public void def(){
        try {
            ActionContext.getContext().getResponse().getWriter().println("hahah");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    @Override
    public Object intercept(InterceptorChain chain) {
        System.out.println("拦截器Before33333333");
        Object handle = chain.handle();
        System.out.println("拦截器After33333333");
        return handle;
    }
}
